package ua.exchangeratesukraine.model;

import android.os.Parcel;
import android.os.Parcelable;

public class BankModel implements Parcelable {

	private String	bankName;
	private String	bankCode;
	
	public BankModel() {
	}

	public String getName() {
		return bankName;
	}

	public void setName(String name) {
		this.bankName = name;
	}

	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel parcel, int flags) {
		parcel.writeString(bankName);
		parcel.writeString(bankCode);
	}

	public static final Creator<BankModel>	CREATOR	= new Parcelable.Creator<BankModel>() {
				// data extract from Parcel
				public BankModel createFromParcel(Parcel in) {
					return new BankModel(in);
				}

				public BankModel[] newArray(int size) {
					return new BankModel[size];
				}
			};

	// constructor, data reads from the Parcel
	private BankModel(Parcel parcel) {
		bankName = parcel.readString();
		bankCode = parcel.readString();
	}

	public String getBankCode() {
		return bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}
}